Revisiting optimistic and pessimistic concurrency control

نویسنده

  • Goetz Graefe
چکیده

Optimistic concurrency control relies on end-of-transaction validation rather than lock acquisition prior to data accesses. Optimistic concurrency control is popular and various systems employ it based on a conviction that it increases concurrency, performance, and scalability. In contrast, we have concluded that optimistic concurrency control permits more concurrency than pessimistic concurrency control only if it fails to detect some actual conflicts or if a particular implementation of locking detects false conflicts. An example of the former is a weak transaction isolation level, e.g., “repeatable read” instead of “re-peatable count,” i.e., serializability. An example of the latter is an unnecessarily coarse granularity of locking, e.g., traditional key-value locking. Another example of the latter is unnecessarily long lock retention, e.g., while writing a commit log record to stable storage in order to ensure a transaction’s durability. A fair comparison of alternative techniques requires equal criteria (e.g., serializability) and equal opportunities (e.g., in terms of granularity of concurrency control, access modes, etc.). In such a comparison, the crucial differences are the timing of conflict detection and the options for conflict resolution. For example, if a conflict between two transactions is found after one of them is already committed, failing the other transaction seems the only recourse. With these issues properly addressed and exploited, pessimistic concurrency control will always match or out-perform optimistic concurrency control. For the time being, this analysis focuses on single-version storage and ignores distributed transactions. External Posting Date: May 26, 2016 [Fulltext] Internal Posting Date: May 26, 2016 [Fulltext]  Copyright 2016 Hewlett Packard Enterprise Development LP

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Concurrency Control Protocol for Nested Transactions in Real-Time Databases

In this paper we consider real-time concurrency control for the nested transaction model. We analyze problems that have pure optimistic and pessimistic approaches. As the solution we propose a hybrid concurrency control algorithm which acts as an optimistic for transactions from different transaction trees and as pessimistic inside a single transaction tree.

متن کامل

Performance Comparison of Distributed Object Server Implementation

In this paper we present performance measurements in a cluster environment. First, we briefly explain our version of optimistic concurrency control and load balance. Then we compare performance and speed-up of a CORBAand an AspectC++-implementation of a distributed object server for pessimistic and optimistic concurrency control.

متن کامل

A Composable Mixed Mode Concurrency Control Semantics for Transactional Programs

Most software transactional memories employ optimistic concurrency control. A pessimistic semantics, however, is not without its benefits: its programming model is often much simpler to reason about and supports the execution of irreversible operations. We present a programming model that supports both optimistic and pessimistic concurrency control semantics. Our pessimistic transactions, guara...

متن کامل

Mostly-Optimistic Concurrency Control for Highly Contended Dynamic Workloads on a Thousand Cores

Future servers will be equipped with thousands of CPU cores and deep memory hierarchies. Traditional concurrency control (CC) schemes -both optimistic and pessimistic -slow down orders of magnitude in such environments for highly contended workloads. Optimistic CC (OCC) scales the best for workloads with few conflicts, but suffers from clobbered reads for high conflict workloads. Although pessi...

متن کامل

Performance Evaluation of an Optimistic Concurrency Control Algorithm Ensuring Strong Consistency for Transaction Time Relations

In this paper, we study the performance of an access concurrency control algorithm for transaction time relations. This algorithm is based on the optimistic approach and detects conflicts as soon as possible. By using EOT marker technique, it has the merit to reduce to the maximum the period during which resources are locked in the validation phase [3]. We have, in previous works, made a formal...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2016